home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / archie-1.4.1 / make.com < prev    next >
Encoding:
Text File  |  1995-06-18  |  17.3 KB  |  541 lines

  1. $! --- MAKE.COM ---                        !x=f$verify(0)
  2. $! Description:
  3. $!  build the Archie client for VAX/VMS
  4. $!
  5. $! Written by Luke Brennan  <brennan@cchs.su.oz.AU>
  6. $!
  7. $! Modifications:
  8. $!    Date    Programmer    Reason for modification.
  9. $! 26-Oct-92       bpk        1.11 Remove ALLOCA.
  10. $! 26-Oct-92       ldcb         1.10 HMMM... alloca.c required by VAXC!!!!
  11. $!                                   (this is a built-in for GNU_CC)
  12. $!                                   add support for NON_GNU_CC (p3 arg) on
  13. $!                                   source entries.
  14. $! 26-Oct-92       ldcb         1.09 Add NOGNU command-line switch so that I
  15. $!                                   can force it to use VAXC rather than GNU.
  16. $! 26-Oct-92       ldcb         1.08 Add GETOPT sources for Archie 1.4
  17. $! 13-Oct-92       bpk        1.07 Add Japan and Taiwan servers.
  18. $! 10-Oct-92       ldcb        1.06 Add (Israel) archie server.
  19. $! 25-Sep-92       ldcb        1.05 Add (USA [NE]) archie server.
  20. $! 23-Sep-92       ldcb       1.04 Details... details..
  21. $!                                   cope with SUPPORT files being used...
  22. $!                                   You will need to enter your OWN stuff
  23. $!                                   into the CREATE_SUPPORT_OPTIONS gosub,
  24. $!                                   as I don't know what you're using!
  25. $! 22-Sep-92       ldcb         1.03 Oops! GCC now works correctly...
  26. $! 22-Sep-92       ldcb        1.02 Clean up a few tiny details.
  27. $! 22-Jan-92       ldcb        1.01 Fix some bugs (so I rushed..)
  28. $! 20-Jan-92       ldcb        1.00 Initial coding.
  29. $!
  30. $ make_version := 1.10
  31. $!
  32. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  33. $ Archie_EXECUTABLE := "archie.exe"
  34. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  35. $! add a new call here with the appropriate new Archie server host(s)
  36. $!
  37. $ arg == 1
  38. $ Call AddHost "archie.au"        "(Australia)"
  39. $ Call AddHost "archie.mcgill.ca"    "(Canada)"
  40. $ Call AddHost "archie.doc.ic.ac.uk"    "(Great Britain/Ireland)"
  41. $ Call AddHost "archie.funet.fi"    "(Finland/Mainland Europe)"
  42. $ Call AddHost "archie.cs.huji.ac.il"    "(Israel)
  43. $ Call AddHost "archie.wide.ad.jp"    "(Japan)"
  44. $ Call AddHost "archie.ncu.edu.tw"    "(Taiwan)"
  45. $ Call AddHost "archie.unl.edu"        "(USA [NE])"
  46. $ Call AddHost "archie.ans.net"        "(USA [NY])"
  47. $ Call AddHost "archie.rutgers.edu"    "(USA [NJ])"
  48. $ Call AddHost "archie.sura.net"    "(USA [MD])"
  49. $ MAXHOSTS = arg - 1
  50. $!
  51. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  52. $! add a new call here with any new source file(s)
  53. $! (P2 should be "SUPPORT" if intended for supporting an unknown TCPIP)
  54. $! (P3 should be "NON_GNU_CC" if a GNU_CC supported function isn't yet in VAXC,
  55. $!                            which means WE have to provide it to VAXC)
  56. $!
  57. $ arg == 1
  58. $ Call AddSource "AQUERY"
  59. $ Call AddSource "ARCHIE"
  60. $ Call AddSource "ATALLOC"
  61. $ Call AddSource "DIRSEND"
  62. $ Call AddSource "GETOPT"
  63. $ Call AddSource "GETOPT1"
  64. $ Call AddSource "GET_PAUTH"
  65. $ Call AddSource "GET_VDIR"
  66. $ Call AddSource "PERRMESG"
  67. $ Call AddSource "PROCQUERY"
  68. $ Call AddSource "PTALLOC"
  69. $ Call AddSource "REGEX"
  70. $ Call AddSource "STCOPY"
  71. $ Call AddSource "SUPPORT"
  72. $ Call AddSource "VLALLOC"
  73. $ Call AddSource "VL_COMP"
  74. $ Call AddSource "VMS_SUPPORT"    "SUPPORT"
  75. $ MAXSOURCEFILES = arg - 1
  76. $!
  77. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  78. $! add a call here with any supported TCP/IP implementations
  79. $!  P1 = name of TCP/IP product, P2 = cc/define to set,
  80. $!  P3 = logical to look for,    P4 = location of link/OPT,
  81. $!  P5 = MINIMUM VERSION of TCP/IP to support
  82. $!
  83. $!  Multinet should be last, as it can 'fake' a UCX if you want it to, so
  84. $!  UCX would come up as the 'real' net even though Multinet is used.
  85. $!
  86. $ arg == 1
  87. $ Call AddTCPIP "UCX"        "UCX"         "UCX$DEVICE" "[.vms]ucx.opt"
  88. $ Call AddTCPIP "WOLLONGONG" "WOLLONGONG"  "TWG$TCP"    "[.vms]woll.opt"
  89. $ Call AddTCPIP "MULTINET"   "MULTINET_30" "MULTINET"   "[.vms]multi.opt" "V3.0"
  90. $ MAXTCPIPTYPES = arg - 1
  91. $!
  92. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  93. $!
  94. $ YES = (1.eq.1)
  95. $ NO  = (1.eq.0)
  96. $!
  97. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  98. $!
  99. $ GoSub get_command_line_args
  100. $ GoSub check_for_GNU_cc        ! use GNU if it's available..
  101. $ GoSub check_which_TCPIP
  102. $ GoSub ask_nearest_ARCHIE_HOST
  103. $ GoSub check_for_strings_H
  104. $ GoSub set_cc_defines
  105. $ GoSub do_compiles
  106. $ If (LINKAGE_REQUIRED)
  107. $ Then GoSub do_link
  108. $ Else Write Sys$OutPut "ARCHIE is up to date."
  109. $ EndIF
  110. $ Exit
  111. $!
  112. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  113. $!
  114. $get_command_line_args:
  115. $ cmdline = P1 + P2 + P3 + P4 + P5 + P6 + P7 + P8
  116. $ If ((f$locate("DEBUG",cmdline) .ne. f$length(cmdline)) -
  117.  .or. (f$locate("DBG",cmdline)   .ne. f$length(cmdline)))
  118. $ Then debug := "/DeBug"
  119. $ Else debug := "/NOdebug"
  120. $ EndIF
  121. $ If (f$locate("FORCE",cmdline) .ne. f$length(cmdline))
  122. $ Then FORCEBUILD = YES
  123. $ Else FORCEBUILD = NO
  124. $ EndIF
  125. $ If (f$locate("LINK",cmdline) .ne. f$length(cmdline))
  126. $ Then FORCELINK = YES
  127. $ Else FORCELINK = NO
  128. $ EndIF
  129. $ If (f$locate("NOGNU",cmdline) .ne. f$length(cmdline))
  130. $ Then FORCEVAXCC = YES
  131. $ Else FORCEVAXCC = NO
  132. $ EndIF
  133. $ If ((f$locate("?",cmdline) .ne. f$length(cmdline)) -
  134.  .or. (f$locate("H",cmdline) .ne. f$length(cmdline)))
  135. $ Then
  136. $   Write Sys$Output "Usage:"
  137. $   Write Sys$OutPut "     @MAKE [<debug>|<force>|<link>|<nognu>|<help>]
  138. $   EXIT
  139. $ EndIF
  140. $ RETURN
  141. $!
  142. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  143. $!
  144. $CHECK_FOR_GNU_CC:
  145. $ If (f$trnlnm("GNU_CC") .nes. "")
  146. $ Then
  147. $   If (.NOT. FORCEVAXCC)
  148. $   Then
  149. $     cc := "GCC/Optimize/Include=([])"
  150. $     gnu_cc = YES
  151. $   Else        ! I'm forcing it to use VAXC
  152. $     cc := "CC/Optimize=NOinline/Include=([])"
  153. $     gnu_cc = NO
  154. $   EndIF
  155. $ Else            ! I can only use VAXC..
  156. $   cc := "CC/Optimize=NOinline/Include=([])"
  157. $   gnu_cc = NO
  158. $ EndIF
  159. $!
  160. $ RETURN
  161. $!
  162. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  163. $! for product P1, cc/define=P2 if logical P3 present on system.
  164. $! Libs/option = P4 if present. ALL get disregarded if less than version P5
  165. $!
  166. $CHECK_WHICH_TCPIP:
  167. $ tcpip_flag :=
  168. $ tcpip_libs :=
  169. $ NO_TCPIP_SUPPORT = YES
  170. $ i = 1
  171. $tcp_loop:
  172. $ If (i .gt. MAXTCPIPTYPES) Then GoTo tcp_check_done
  173. $ If (f$type(tcpip_P2_'i') .eqs. "") Then GoTo tcp_check_done
  174. $ If (f$type(tcpip_P3_'i') .nes. "")
  175. $ Then
  176. $   tcpip_logical = tcpip_P3_'i'
  177. $   If (tcpip_logical .nes. "")
  178. $   Then                    ! logical to look for
  179. $     If (f$logical(tcpip_logical) .nes. "")
  180. $     Then
  181. $       tcpip_flag = tcpip_P2_'i'
  182. $       tcpip_flag = f$fao(",!AS=1",tcpip_flag)
  183. $       NO_TCPIP_SUPPORT = NO
  184. $       If (f$type(tcpip_P4_'i') .nes. "")
  185. $       Then                    ! link/OPT file location
  186. $        tcpip_linkOPTs = tcpip_P4_'i'
  187. $         If (tcpip_linkOPTs .nes. "")
  188. $         Then
  189. $           If (f$search(tcpip_linkOPTs) .nes. "")
  190. $           Then
  191. $             tcpip_libs = tcpip_P4_'i'
  192. $             tcpip_libs = f$fao("!AS/Option",tcpip_libs)
  193. $           EndIF
  194. $         EndIF
  195. $       EndIF
  196. $       If (f$type(tcpip_P5_'i') .nes. "")
  197. $       Then                    ! minimum version specified
  198. $         If (tcpip_P5_'i' .nes. "")
  199. $         Then
  200. $           GoSub CheckIfVersionOK
  201. $           If VERSION_TOO_EARLY
  202. $           Then                ! too early.. use SUPPORT files
  203. $             tcpip_flag :=
  204. $             tcpip_libs :=
  205. $             NO_TCPIP_SUPPORT = YES
  206. $          tcp_ver = tcpip_P5_'i'
  207. $             tcp_name = tcpip_P1_'i'
  208. $             Write Sys$OutPut f$fao( -
  209.            "Your version of !AS is earlier than !AS.",tcp_name,tcp_ver)
  210.           Write Sys$OutPut "MAKE will use STD support files instead."
  211. $          If (f$mode() .eqs. "INTERACTIVE")
  212. $          Then
  213. $            Read/Prompt="enter <CR> to continue" SYS$COMMAND dummy
  214. $          EndIF
  215. $           EndIF
  216. $         EndIF
  217. $       EndIF
  218. $     EndIF
  219. $   EndIF
  220. $ EndIF
  221. $ i = i + 1
  222. $ Goto tcp_loop
  223. $tcp_check_done:
  224. $ RETURN
  225. $!
  226. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  227. $!
  228. $ASK_NEAREST_ARCHIE_HOST:
  229. $GoSub CLRSCN
  230. $ Write Sys$OutPut f$fao("archie make V!AS!/!/!AS!/!/", -
  231.     make_version, -
  232.     "           Enter the number of the ARCHIE HOST nearest you.")
  233. $!
  234. $ i = 1
  235. $_display_loop:
  236. $ If (i .gt. MAXHOSTS) Then GoTo _display_done
  237. $  Write Sys$OutPut f$fao("!2SL) !25AS  !AS",i,host_P1_'i',host_P2_'i')
  238. $  i = i + 1
  239. $ GoTo _display_loop
  240. $_display_done:
  241. $!
  242. $ If (f$mode() .eqs. "INTERACTIVE")
  243. $ Then
  244. $   Assign/User_Mode/NOlog Sys$Command Sys$InPut
  245. $_select_loop:                ! get their selection
  246. $   selection = 99
  247. $   Read     Sys$Command selection    -
  248.         /End=_selection_made    -
  249.         /Prompt="Enter number of your selection: "
  250. $_selection_made:
  251. $   If (selection .gt. MAXHOSTS)
  252. $   Then
  253. $     Write Sys$Error f$fao("!AS !2SL", "error: Options only go to", MAXHOSTS)
  254. $     GoTo _select_loop
  255. $   EndIF
  256. $   ascii_string = f$edit(selection,"COLLAPSE,UPCASE")
  257. $   ascii_char = f$extract(0,1,ascii_string)
  258. $   If (ascii_char .eqs. "Q") Then EXIT
  259. $   If (f$length(ascii_string) .eq. 1) Then ascii_string = "0" + ascii_string
  260. $   If .NOT. (("00".lts.ascii_string) .and. (ascii_string.les."''MAXHOSTS'"))
  261. $   Then
  262. $     Write Sys$Error -
  263.         f$fao("error: Enter option NUMBER (up to !2SL)", MAXHOSTS)
  264. $     Goto _select_loop
  265. $   EndIF
  266. $ Else            ! BATCH can't be queried - assume selection 1
  267. $   selection = 1
  268. $ EndIF
  269. $!
  270. $ local_archie = host_P1_'selection'
  271. $!
  272. $ RETURN
  273. $!
  274. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  275. $! If we're using VAXC then we need to grab STRINGS.H from SYS$LIBRARY.
  276. $CHECK_FOR_STRINGS_H:
  277. $ delete := delete
  278. $ copy   := copy
  279. $ If (f$search("strings.h") .nes. "") Then delete/nolog/noconfirm []strings.h;*
  280. $ If ((.NOT. (GNU_CC)) -
  281.   .or. (FORCEVAXCC)) Then copy/noconfirm sys$library:string.h []strings.h
  282. $!
  283. $ RETURN
  284. $!
  285. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  286. $! **NOTE** use of global symbol!!!
  287. $! **NOTE** this is the only way I could pass it to the compile subroutine
  288. $! **NOTE** without DCL and/or CC stripping off too many layers of quotes..
  289. $! **NOTE** yeah.. I know.. It's ugly...  you work it out!! :-)
  290. $SET_CC_DEFINES:
  291. $ archie_host = " """"""ARCHIE_HOST=""""""""''local_archie'"""""""" """""" "
  292. $ cflags :== /define=(debug=1,funcs=1,noregex=1'tcpip_flag','archie_host')
  293. $!
  294. $RETURN
  295. $!
  296. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  297. $!
  298. $DO_COMPILES:
  299. $ GoSub CLRSCN
  300. $ LINKAGE_REQUIRED == NO
  301. $ If ("''f$type(Archie_EXECUTABLE)'" .nes. "")
  302. $ Then
  303. $   If (Archie_EXECUTABLE .nes. "")
  304. $   Then If (f$search(Archie_EXECUTABLE) .eqs. "") Then LINKAGE_REQUIRED == YES
  305. $   Else If (f$search("Archie.exe") .eqs. "") Then LINKAGE_REQUIRED == YES
  306. $   EndIF
  307. $ Else
  308. $   If (f$search("Archie.exe") .nes. "") Then LINKAGE_REQUIRED == YES
  309. $ EndIF
  310. $ i = 1
  311. $cc_loop:
  312. $ If (i .gt. MAXSOURCEFILES) Then GoTo cc_done
  313. $ source_file = source_P1_'i'
  314. $ If ((.NOT. GNU_CC) -
  315.   .or.((GNU_CC).and.((f$type(source_P3_'i').eqs."").or.(source_P3_'i'.eqs.""))))
  316. $ Then
  317. $   If ((f$type(source_P2_'i') .eqs. "") .or. (source_P2_'i' .eqs. ""))
  318. $   Then Call Compile "''cc'" "''source_file'" "''debug'" 'FORCEBUILD'
  319. $   Else
  320. $     If ((NO_TCPIP_SUPPORT) .and. (source_P2_'i' .eqs. "SUPPORT"))
  321. $     Then Call Compile "''cc'" "''source_file'" "''debug'" 'FORCEBUILD'
  322. $     EndIF
  323. $   EndIF
  324. $ EndIF
  325. $ i = i + 1
  326. $ GoTo cc_loop
  327. $cc_done:
  328. $ If (FORCELINK) Then LINKAGE_REQUIRED == YES
  329. $!
  330. $ RETURN
  331. $!
  332. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  333. $!
  334. $DO_LINK:
  335. $ If (f$type(Archie_EXECUTABLE) .nes. "")
  336. $ Then
  337. $   If (Archie_EXECUTABLE .nes. "")
  338. $   Then executable := /Exec='Archie_EXECUTABLE'
  339. $   Else executable := /Exec=Archie.exe
  340. $   EndIF
  341. $ Else
  342. $   executable := /Exec=Archie.exe
  343. $ EndIF
  344. $ i = 1
  345. $ object_files :=
  346. $object_files_loop:
  347. $ If (i .gt. MAXSOURCEFILES) Then GoTo object_files_done
  348. $ object_file = source_P1_'i'
  349. $ If ((.NOT. GNU_CC) -
  350.   .or.((GNU_CC).and.((f$type(source_P3_'i').eqs."").or.(source_P3_'i'.eqs.""))))
  351. $ Then
  352. $   If ((f$type(source_P2_'i') .eqs. "") .or. (source_P2_'i' .eqs. ""))
  353. $   Then object_files := 'object_files'+'object_file'
  354. $   Else
  355. $     If ((NO_TCPIP_SUPPORT) .and. (source_P2_'i' .eqs. "SUPPORT"))
  356. $     Then object_files := 'object_files'+'object_file'
  357. $     EndIF
  358. $   EndIF
  359. $ EndIF
  360. $ i = i + 1
  361. $ GoTo object_files_loop
  362. $object_files_done:
  363. $ If (f$extract(0,1,object_files) .eqs. "+")
  364. $ Then object_files = f$extract(1,f$length(object_files),object_files)
  365. $ EndIF
  366. $!
  367. $ If (gnu_cc)
  368. $ Then
  369. $   If (tcpip_libs .nes. "")
  370. $   Then tcpip_libs = tcpip_libs + ",GNU_CC:[000000]GCCLIB/Library"
  371. $   Else tcpip_libs = "GNU_CC:[000000]GCCLIB/Library"
  372. $   EndIF
  373. $ EndIF
  374. $!
  375. $ If (NO_TCPIP_SUPPORT)
  376. $ Then
  377. $   dev=f$TrnLnm("SYS$DISK")
  378. $   If (f$search("NO_SUPPORT.OPT") .eqs. "") Then GoSub Create_Support_Options
  379. $   If (tcpip_libs .nes. "")
  380. $   Then tcpip_libs = tcpip_libs + ",'dev'[]No_Support.opt/OPTION"
  381. $   Else tcpip_libs = "'dev'[]No_Support.opt/OPTION"
  382. $   EndIF
  383. $ EndIF
  384. $!
  385. $ If (tcpip_libs .nes. "")
  386. $ Then object_files = object_files + ","
  387. $ EndIF
  388. $!
  389. $ Set Verify
  390. $ Link'debug''executable' 'object_files''tcpip_libs'
  391. $ x='f$verify(0)'
  392. $!
  393. $ here =f$environment("procedure") ! assume .EXE is in same directory as MAKE.
  394. $ here = f$parse(here,,,"DEVICE") + f$parse(here,,,"DIRECTORY")
  395. $!
  396. $ Write Sys$OutPut " "
  397. $ Write Sys$OutPut " "
  398. $ Write Sys$OutPut "Done! Define the symbol ARCHIE & fire away."
  399. $ Write Sys$OutPut "e.g."
  400. $ Write Sys$OutPut f$fao("  $ archie :== $!AS!AS",here,archie_executable)
  401. $ Write Sys$OutPut "  $ archie GOPHER"
  402. $!
  403. $ RETURN
  404. $!
  405. $! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  406. $!
  407. $CLRSCN:
  408. $If (f$GetDVI("TT:","TT_ANSICRT"))            ! ANSI compatible?
  409. $Then
  410. $  CSI = "x["
  411. $  CSI[0,8] = 27
  412. $  CLS = CSI + "H" + CSI +"2J"
  413. $  Write Sys$OutPut CLS
  414. $Else                    ! otherwise pump out some <CR>s..
  415. $  lines=f$GetDVI("TT:","TT_PAGE")
  416. $  Write Sys$Output f$fao("!''lines'(/)")
  417. $EndIF
  418. $Return
  419. $!
  420. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  421. $!
  422. $AddHOST: SUBROUTINE
  423. $ host_P1_'arg' :== "''P1'"
  424. $ host_P2_'arg' :== "''P2'"
  425. $ arg == arg + 1    ! *NOTE* global symbols used...
  426. $ENDSUBROUTINE
  427. $!
  428. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  429. $!
  430. $AddSOURCE: SUBROUTINE
  431. $ source_P1_'arg' :== "''P1'"
  432. $ source_P2_'arg' :== "''P2'"
  433. $ source_P3_'arg' :== "''P3'"
  434. $ arg == arg + 1    ! *NOTE* global symbols used...
  435. $ENDSUBROUTINE
  436. $!
  437. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  438. $!
  439. $AddTCPIP: SUBROUTINE
  440. $ tcpip_P1_'arg' :== "''P1'"
  441. $ tcpip_P2_'arg' :== "''P2'"
  442. $ tcpip_P3_'arg' :== "''P3'"
  443. $ tcpip_P4_'arg' :== "''P4'"
  444. $ tcpip_P5_'arg' :== "''P5'"
  445. $ arg == arg + 1    ! *NOTE* global symbols used...
  446. $ENDSUBROUTINE
  447. $!
  448. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  449. $! **NOTE** cflags is a GLOBAL symbol due to problems with quoted /Defines
  450. $! **NOTE** not passing down correctly.. (I gave up!)
  451. $Compile: SUBROUTINE
  452. $ YES = (1.eq.1)
  453. $! --- do a Make of only that source which has been modified since its
  454. $!     object code was generated or that is missing its object code.
  455. $ cc       = "''P1'"
  456. $ source   = "''P2'"
  457. $ dbg      = "''P3'"
  458. $ FORCED   = P4
  459. $!
  460. $source = source - ".C" + ".C"
  461. $ t1 = f$search("''source'")                ! source exists?
  462. $  If (t1 .eqs. "") Then GoTo _error_source_missing    ! YIPE!
  463. $   source = source - ".C"
  464. $    if (FORCED) Then GoTo _compile_the_source        ! forced to compile
  465. $     t1 = f$search("''source'.OBJ")            ! object exist?
  466. $     If (t1 .eqs. "") Then GoTo _compile_the_source    ! object missing
  467. $     t1 = f$file_attributes("''source'.OBJ","RDT")    ! when was the OBJECT
  468. $    t1 = f$cvtime(t1)                    ! produced? (rev date)
  469. $   t2 = f$file_attributes("''source'.C","RDT")        ! when was source last
  470. $  t2 = f$cvtime(t2)                    ! modified?
  471. $ If (t1 .ges. t2) Then GoTo _bypass_compile        ! object still current
  472. $_compile_the_source:
  473. $ set verify
  474. $ 'cc -
  475.   'cflags -
  476.   'dbg 'source
  477. $ x='f$verify(0)'
  478. $ LINKAGE_REQUIRED == YES
  479. $  GoTo _cc_done
  480. $_bypass_compile:                    ! didn't need to
  481. $  GoTo _cc_done                    ! generate new OBJ file
  482. $_error_source_missing:
  483. $ Write Sys$Error "ERROR: unable to locate source file ''source'"
  484. $_cc_done:
  485. $ENDSUBROUTINE
  486. $!
  487. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  488. $!
  489. $CHECKIFVERSIONOK:
  490. $ required_version = tcpip_P5_'i'
  491. $ tcpip_type = tcpip_P1_'i'
  492. $ If ("MULTINET" .eqs. tcpip_type)
  493. $ Then                        ! I know how to check MULTINET
  494. $   If (f$search("MULTINET:MULTINET_VERSION.;") .nes. "")
  495. $   Then
  496. $     Open/share=READ fd MULTINET:MULTINET_VERSION.;
  497. $     Read fd buffer
  498. $     Close fd
  499. $     v = buffer - "VERSION"
  500. $     v = f$edit(v,"TRIM,COMPRESS")
  501. $     If (v .ges. required_version)
  502. $     Then VERSION_TOO_EARLY = NO
  503. $     Else VERSION_TOO_EARLY = YES
  504. $     EndIF
  505. $   Else
  506. $     VERSION_TOO_EARLY = YES
  507. $   EndIF
  508. $ Else                        ! don't know, so assume current
  509. $   VERSION_TOO_EARLY = NO
  510. $ EndIF
  511. $!
  512. $ RETURN
  513. $!
  514. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  515. $!
  516. $CREATE_SUPPORT_OPTIONS:
  517. $ Open/Write fd No_Support.OPT
  518. $ Write fd "! --- No_Support.OPT ---"
  519. $ Write fd "!"
  520. $ Write fd "! provides the VaxCrtl linkage for the client that has no"
  521. $ Write fd "! known supported TCP/IP implementation."
  522. $ Write fd "!"
  523. $ Write fd "Sys$Share:VaxCrtl.exe/Share"
  524. $ Write fd "!"
  525. $ Write fd "! You will have to add in your specific TCP/IP libraries here."
  526. $!
  527. $! Early MULTINETs would look something like this... (I don't remember!)
  528. $! I assume CMUTEK would need something along these lines too...
  529. $!
  530. $! If (F$TrnLnm("MULTINET") .nes. "")
  531. $! Then
  532. $!   Write fd "Multinet:Multinet_Socket_Library.exe/Share
  533. $! EndIF
  534. $!
  535. $ Write fd "!"
  536. $ Close fd
  537. $!
  538. $ RETURN
  539. $!
  540. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  541.